/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.quantum.jbencoder.types;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

/**
 *
 * @author g073025
 */
public interface BencodedType {
    /**
     * serialize (convert) a BencodedType object into UTF 8 stream
     * @param os
     * @throws IOException 
     */
    public void serialize(OutputStream os) throws IOException;
    
    /**
     * deserialize (convert) an inputStream into BencodedType
     * @return 
     */
    public void deserialize(InputStream is) throws IOException;
    
}
